home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Pearls / dev / C-Lib / AsyncIO / include / clib / asyncio_protos.h
Encoding:
C/C++ Source or Header  |  1995-12-01  |  2.2 KB  |  78 lines

  1. #ifndef CLIB_ASYNCIO_PROTOS_H
  2. #define CLIB_ASYNCIO_PROTOS_H
  3.  
  4. #ifndef LIBRARIES_ASYNCIO_H
  5. #include <libraries/asyncio.h>
  6. #endif
  7.  
  8.  
  9. /*****************************************************************************/
  10.  
  11.  
  12. #ifdef _DCC
  13.  
  14. #define _REG(x)    __ ## x
  15. #define _ASM
  16. #define _ARGS __regargs
  17.  
  18. #else
  19.  
  20. #ifdef __GNUC__
  21.  
  22. #define _REG(x)
  23. #define _ASM
  24.  
  25. #else /* __SASC__ */
  26.  
  27. #define _REG(x)    register __ ## x
  28. #define _ASM    __asm
  29.  
  30. #endif /* __GNUC__ */
  31.  
  32. #endif /* _DCC */
  33.  
  34.  
  35. #ifndef ASIO_SHARED_LIB
  36. #ifndef ASIO_REGARGS
  37. #undef _REG
  38. #define _REG(x)
  39. #undef _ASM
  40. #define _ASM
  41.  
  42. #ifdef _DCC
  43. #undef _ARGS
  44. #define _ARGS __stkargs
  45. #else
  46. #ifdef __GNUC__
  47. #undef _ARGS
  48. #else /* __SASC__ */
  49. #undef _ARGS
  50. #define _ARGS __stdargs
  51. #endif /* __GNUC__ */
  52. #endif /* _DCC */
  53. #endif
  54.  
  55. #endif
  56.  
  57.  
  58. /*****************************************************************************/
  59.  
  60.  
  61. #ifdef ASIO_NOEXTERNALS
  62. _ASM _ARGS AsyncFile *OpenAsync( _REG( a0 ) const STRPTR fileName,_REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize, _REG( a1 ) struct ExecBase *SysBase, _REG( a2 ) struct DosLibrary *DOSBase );
  63. _ASM _ARGS AsyncFile *OpenAsyncFromFH( _REG( a0 ) BPTR handle, _REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize, _REG( a1 ) struct ExecBase *SysBase, _REG( a2 ) struct DosLibrary *DOSBase );
  64. #else
  65. _ASM _ARGS AsyncFile *OpenAsync( _REG( a0 ) const STRPTR fileName,_REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  66. _ASM _ARGS AsyncFile *OpenAsyncFromFH( _REG( a0 ) BPTR handle, _REG( d0 ) OpenModes mode, _REG( d1 ) LONG bufferSize );
  67. #endif
  68. _ASM _ARGS LONG       CloseAsync( _REG( a0 ) AsyncFile *file );
  69. _ASM _ARGS LONG       ReadAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  70. _ASM _ARGS LONG       ReadCharAsync( _REG( a0 ) AsyncFile *file );
  71. _ASM _ARGS LONG       ReadLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) STRPTR buffer, _REG( d0 ) LONG size );
  72. _ASM _ARGS LONG       WriteAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) APTR buffer, _REG( d0 ) LONG numBytes );
  73. _ASM _ARGS LONG       WriteCharAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) UBYTE ch );
  74. _ASM _ARGS LONG       WriteLineAsync( _REG( a0 ) AsyncFile *file, _REG( a1 ) STRPTR line );
  75. _ASM _ARGS LONG       SeekAsync( _REG( a0 ) AsyncFile *file, _REG( d0 ) LONG position, _REG( d1 ) SeekModes mode);
  76.  
  77. #endif
  78.